<template>
  <view>
    <!--切屏警告-->
    <u-popup :show="isPopup" mode="bottom" :round="10" closeable :customStyle="popStyle" @close="close">
      <view style="padding: 40rpx;align-items: center;text-align: center;">
        <view>
          切屏警告
        </view>
        <image style="width: 180rpx;height: 200rpx;margin: 20rpx 0;"
               src="https://qiniu-bjjrzy.bjjrzy.com/bjupi/practice/cognPractice/improve/answer/answer-icon.svg"></image>
        <view v-if="lastNum === 1">系统检测到您已切屏多次，再次切屏将会判定违规，系统将会强制交卷</view>
        <view v-else>系统检测到您切换屏幕，请切换回答题页面</view>
      </view>
    </u-popup>
  </view>

</template>
<script>
export default {
  name: "CutScreenMsg",
  props: {
    lastNum: {
      type: Number,
    },
    isPopup:{
      type: Boolean,
    }
  },
  data() {
    return {
      popStyle: {width: '90%', margin: '0 auto', borderRadius: '40rpx', marginBottom: '40rpx'}
    }
  },
  methods:{
    close(){
      this.$emit('close')
    }
  }
}
</script>
<style scoped lang="scss">

</style>